home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#48 (Sep 89)
/
Zoundz Source
/
Message.Pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-05-01
|
931b
|
30 lines
unit Message;
interface
procedure A_Message (s0, s1, s2, s3: str255; var theItem: integer);
implementation
procedure A_Message;
var
itemHit: Integer;
AlertResHandle: AlertTHndl;
tempRect: Rect;
begin {Start of alert handler}
ParamText(s0, s1, s2, s3);
AlertResHandle := AlertTHndl(GetResource('ALRT', 4));
HLock(Handle(AlertResHandle));
tempRect := AlertResHandle^^.boundsRect;
tempRect.Left := ((screenBits.Bounds.Right - screenBits.Bounds.Left) - (tempRect.Right - tempRect.Left)) div 2;{Center Horz}
tempRect.Bottom := tempRect.Top + (AlertResHandle^^.boundsRect.Bottom - AlertResHandle^^.boundsRect.Top);
tempRect.Right := tempRect.Left + (AlertResHandle^^.boundsRect.Right - AlertResHandle^^.boundsRect.Left);
AlertResHandle^^.boundsRect := tempRect;
theItem := NoteAlert(4, nil);
HUnLock(Handle(AlertResHandle));
end; {End of procedure}
end. {End of unit}